<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<!--TDK-->
<th:block th:fragment="seo">
    <title th:text="${session.basic.seo.webTitle}"></title>
<!--    <meta name="robots" content="index,follow"/>-->
    <meta name="description" th:content="${session.basic.seo.webDescription}"/>
    <meta name="keywords" th:content="${session.basic.seo.webKeyword}"/>
    <link rel="shortcut icon" type="image/x-icon" href="/images/face/65.gif" />
</th:block>
<body>

<!-- 页面头 -->
<div class="top" th:fragment="top_nav">
    <h1 class="top_logo"><a href="/" title="奥鹏作业辅导网"><img height="70" th:src="@{/img/aopeng.png}" ></a></h1>
    <ul class="layui-nav layui-bg-cyan " lay-filter="">
        <li class="layui-nav-item"><h1><a href="/">首页</a></h1></li>
        <li class="layui-nav-item" th:each="n:${session.basic.nav}" th:if="${n.isNav eq 1}"><h1><a th:href="@{/client/row(id=${n.examinationId},schoolName=${n.columnName})}" th:text="${n.columnName}"></a></h1></li>
        <li class="layui-nav-item"><h1><a th:href="@{/client/schoolAll}">所有大学</a></h1></li>
    </ul>
</div>

<!-- 轮播图 -->
<div class="layui-carousel" id="test1" th:fragment="carousel">
    <div carousel-item>
        <div align="center"><img height="100%" src="img/carousel_1.png"></div>
        <div>条目2</div>
        <div>条目3</div>
        <div>条目4</div>
        <div>条目5</div>
    </div>
</div>

<th:block th:fragment="carousel_js">
    <script>
        layui.use('carousel', function(){
            var carousel = layui.carousel;
            //建造实例
            carousel.render({
                elem: '#test1'
                ,width: '100%' //设置容器宽度
                ,arrow: 'always' //始终显示箭头
                //,anim: 'updown' //切换动画方式
            });
        });
    </script>
</th:block>

<!-- 搜索框 -->
<form th:action="@{/client/row}" class="layui-form form" th:method="post" th:fragment="search_form">
    <div class="layui-form-item form_box layui-form-pane">
        <label class="layui-form-label">搜索</label>
        <div class="layui-input-inline form_input">
            <input th:type="text" th:name="name" required lay-verify="required" placeholder="请输入搜索內容" autocomplete="off" class="layui-input">
        </div>
        <!--						<button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>-->
        <input th:type="submit" class="layui-btn" value="搜索">
        <div class="form_a">
            <strong>热门学校:</strong>
            <span>
                <span class="layui-breadcrumb span" lay-separator="|">
                  <a th:each="school,iterStat:${session.basic.school}" th:href="@{/client/row(id=${school.id},schoolName=${school.schoolName})}" th:text="${school.schoolName}">北京大学</a>
                </span>
            </span>
        </div>
    </div>
</form>

<!-- 固定窗口 -->
<div class="fixed_right" align="right" th:fragment="fixed_right">
    <ul class="left_fixed">
        <li class="qq"><i class="layui-icon layui-icon-login-qq"></i></li>
        <li class="wx"><i class="layui-icon layui-icon-login-wechat"></i></li>
    </ul>
    <div class="right_fixed_wx">
        <img class="content_img" th:src="@{/img/weixinQrCode.png}">
        <p>微信联系</p>
    </div>
    <div class="right_fixed_qq">
        <p>毕业论文联系</p>
        <a class="bottom_qq" href="tencent://message/?Menu=yes&uin=210969415&Site=80fans&Service=300&sigT=45a1e5847943b64c6ff3990f8a9e644d2b31356cb0b4ac6b24663a3c8dd0f8aa12a545b1714f9d45">
            <img height="16" th:src="@{/img/download.gif}" >
        </a>
        <p>需要答案联系</p>
        <a class="bottom_qq" href="tencent://message/?Menu=yes&uin=210969415&Site=80fans&Service=300&sigT=45a1e5847943b64c6ff3990f8a9e644d2b31356cb0b4ac6b24663a3c8dd0f8aa12a545b1714f9d45">
            <img height="16" th:src="@{/img/download.gif}" >
        </a>
        <p>作业代做联系</p>
        <a class="bottom_qq" href="tencent://message/?Menu=yes&uin=210969415&Site=80fans&Service=300&sigT=45a1e5847943b64c6ff3990f8a9e644d2b31356cb0b4ac6b24663a3c8dd0f8aa12a545b1714f9d45">
            <img height="16" th:src="@{/img/download.gif}" >
        </a>
    </div>
</div>
<!--页面底部bottom-->
<div class="bottom layui-col-md12" th:fragment="bottom">
    <div class="bottom_box layui-col-md12" align="left">
        <span>友情链接:</span>
        <span class="layui-breadcrumb bottom_links" lay-separator="|">
          <a th:each="link,iterStat:${session.basic.link}" th:href="${link.linkAddress}" th:text="${link.linkName}"></a>
        </span>
        <div class="bottom_text">
            站长联系方式：QQ-210969415
            <a class="bottom_qq" href="tencent://message/?Menu=yes&uin=210969415&Site=80fans&Service=300&sigT=45a1e5847943b64c6ff3990f8a9e644d2b31356cb0b4ac6b24663a3c8dd0f8aa12a545b1714f9d45">
                <img height="16" th:src="@{/img/download.gif}" >
            </a>
            微信号-xhmcz122
        </div>
    </div>
</div>

<th:block th:fragment="index_css">
    <link rel="stylesheet" th:href="@{/css/index.css}" type="text/css" />
    <link type="text/css" th:href="@{/css/layui.css}" rel="stylesheet" media="all"/>
    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?c2d93f9cd01a0ffb9a5d9770c55a1ee3";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</th:block>
<th:block th:fragment="index_script">
    <script th:src="@{/js/layui.js}" charset="utf-8"></script>
    <script th:src="@{/js/index.js}" charset="UTF-8"></script>
</th:block>
<th:block th:fragment="page">
    <script th:src="@{/js/jquery-3.3.1.min.js}"></script>
    <script th:inline="javascript">
        layui.use(['element','laypage'], function() {
            var element = layui.element,
                laypage = layui.laypage;
            var limit=[[${page.limit}]];//显示条数
            var curr=[[${page.curr}]];//当前页数
            var count=[[${count}]];//数据条数

            //条件获取
            var id=$("#schoolId").attr("data_id");
            var name=$("#schoolId").attr("data_name");
            var type=$("#schoolId").attr("data_type");
            var line=$("#schoolId").attr("data_line");

            //执行一个laypage实例
            laypage.render({
                elem: 'paging' //注意，这里的 test1 是 ID，不用加 # 号
                ,request:{
                    pageName: 'page'
                    ,limitName: 'limit'
                }
                ,curr: curr //获取起始页
                ,limit:limit
                ,count:count//数据总数，从服务端得到
                ,jump: function(obj,first){
                    if(!first){
                        $.ajax({
                            url:'/client/row/lay'
                            ,method:"post"
                            ,data:{"id":id,"name":name,"type":type,"line":line,"curr":this.curr}
                            ,success:function (data) {
                                var html='';
                                for (let i = 0; i < data.pageData.length; i++) {
                                    html+='\t\t\t\t\t\t\t<div>\n'
                                        + '\t\t\t\t\t\t\t\t<h3 id="row_body_title" class="content_title content_row_title layui-card-header layui-col-md12"><a href="/client/content/'+data.pageData[i].id+'.html" title="'+data.pageData[i].examinationName+'" target="_blank">'+data.pageData[i].examinationName+'</a></h3>\n'
                                        + '\t\t\t\t\t\t\t\t<p class="content_p row_body_title layui-col-md12">'+data.pageData[i].description+'</p>\n'
                                        + '\t\t\t\t\t\t\t</div>\n';
                                }
                                $("#row_body").html(html)
                                console.log(data.pageData.length)
                                // element.init();
                            }
                        })
                    }
                    // location.reload();
                }
            });
        });
    </script>
</th:block>
</body>
</html>